<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of ActionService
 *
 * @author Administrator
 */
class ActionService {

    function listAll() {
        $menu = D('action')->select();

        $menuVal = array();

        foreach ($menu as $action) {
            array_push($menuVal, array(
                'id' => 'action_' . $action['id'],
                'title' => $action['show_name'],
                'attr' => array(
                    array(
                        'key' => 'url',
                        'value' => $action['url']
                    )
                )
            ));
        }
        return array(array('id' => '',
                'title' => '所有菜单',
                'attr' => array(),
                'children' => $menuVal));
    }

}

?>
